using System;

namespace DecoratorDemo
{
    /// <summary>
    /// 被装饰者
    /// </summary>
    [Decorator(typeof(Decorator1))]
    [Decorator(typeof(Decorator2))]
    [Decorator(typeof(Decorator3))]
    public class BeDecorator : IDecorator
    {
        private readonly string _identity;
        public BeDecorator(string identity)
        {
            _identity = identity ?? "被装饰者";
        }

        public string Decorate()
        {
            return $"{_identity}";
        }
    }
}
